package com.wlz.framework.protocol.dubbo;

import com.wlz.framework.Invocation;
import com.wlz.framework.Protocol;
import com.wlz.framework.URL;

/**
 * @author wlz
 * @date 2022-07-11  10:33 下午
 */
public class DubboProtocol implements Protocol {
    @Override
    public void start(URL url) {
        NettyServer nettyServer = new NettyServer();
        nettyServer.start(url.getHostname(), url.getPort());
    }

    @Override
    public String send(URL url, Invocation invocation) {
        NettyClient nettyClient = new NettyClient();
        return nettyClient.send(url.getHostname(),url.getPort(), invocation);
    }
}
